home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-13 | 2.9 KB | 90 lines | [TEXT/MPS ] |
- {[a-,body+,h-,o=100,r+,rec+,t=4,u+,#+,j=20/57/1$,n+]}
- {$D+}
-
- {------------------------------------------------------------------------------
- MakeSA.p Implements a tool for massaging a simple application into a
- single stand alone code resource.
-
- Syntax of MakeSA:
-
- MakeSA [options] filename [filenames…]
-
- Options:
-
- -ct TYPE ---- set rsrc type of non-main code segments (default = 'DUDE')
- -fc TYPE ---- set the creator attribute of the file (default = 'RSED')
- -ft TYPE ---- set the type attribute of the file (default = 'rsrc')
- -help ------- return this help text
- -id integer - set the rsrc ID of the MAIN segment (default = 128)
- -mt TYPE ---- set the rsrc type of the MAIN segment (default = 'DUDE')
- -mn Name ---- set the rsrc name of the MAIN segment (default = '')
- -o filename - Name of the output file (default = input.dude; not done yet)
- -[No]S ------ Allow for multi-segmented code (default = -NoS)
- -[No]P ------ report progress to stdout (default = -NoP)
- -[No]T ------ report processing time (default = -NoT)
-
- NOTE - tools cannot currently be built with -debug… Sorry!
- ------------------------------------------------------------------------------}
- UNIT UMakeSA;
-
- INTERFACE
-
- USES
- { • MacApp }
- UMacApp,
-
- { • Building Blocks }
-
- { • Required for this unit's interface }
- UAssociation,
-
- { • Implementation use }
- CursorCtl, Signal, PasLibIntf, IntEnv, ErrMgr, Events, OSUtils, Memory,
- Resources, Fonts, Packages, ToolUtils, Errors,
-
- { • Inherits from }
- UMPWTool, UMakeSAGlobals, UMultiSegSA, USingleSegSA;
-
- CONST
-
- { • Tool Keyword Constants • }
- kwFType = 1; { File type }
- kwFCreator = 2; { File creator }
- kwMType = 3; { Resource type of main segment }
- kwMId = 4; { Resource ID of main segment }
- kwMName = 5; { Resource name of main segment }
- kwCType = 6; { Resource type of non-main code segments }
- kwSeg = 7; { Multiple segments }
- kwNoSeg = 8; { Merge segments into MAIN }
- kwOut = 9; { Output file name }
-
- TYPE
-
- TMakeSA = OBJECT (TMPWTool)
- fFileType: OSType;
- fFileCreator: OSType;
- fMainType: ResType;
- fMainID: Integer;
- fMainName: StringHandle;
- fDoMultiSeg: Boolean;
- fOtherSegsType: ResType;
- fFileNames: TDynamicArray;
-
- PROCEDURE TMakeSA.IMakeSA;
- PROCEDURE TMakeSA.DoProcessFileArg(arg: Str255); OVERRIDE;
- PROCEDURE TMakeSA.DoProcessOptionArg(kw: integer); OVERRIDE;
- PROCEDURE TMakeSA.DoShowUsage; OVERRIDE;
- PROCEDURE TMakeSA.DoShowProgress(aStr: Str255);
- PROCEDURE TMakeSA.DoToolAction; OVERRIDE;
- PROCEDURE TMakeSA.InstallKeyWords; OVERRIDE;
- PROCEDURE TMakeSA.ForEachFileDo(PROCEDURE DoToFile(aFile: FileSpec));
- END;
-
- VAR
- gMakeSA: TMakeSA; { One global! References the tool so we can some methods. }
-
- {--------------------------------------------------------------------------------------------------}
-
- IMPLEMENTATION
- {$I UMakeSA.incl.p}
- END.